<?php
/* @var $this TransferController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'部门调动',
	'我的调动记录'=>array('transfer/my'),
);

$this->menu=array(
	array('label'=>'Create Transfer', 'url'=>array('create')),
	array('label'=>'Manage Transfer', 'url'=>array('admin')),
);
?>
<span class="page_h3">我的调动记录</span>
<?php
$this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'user-grid',
    'dataProvider'=>$dataProvider,
	'summaryText'=>'<font color=#0066A4>显示{start}-{end}条.共{count}条记录,当前第{page}页</font>',
    //'filter'=>$model,
	'columns'=>array( 
		array(
			'name'=>'id',
			'sortable' => true,
		),
		array(
			'name'=>'transfer_c_usernames',
			'htmlOptions'=>array(
                'width'=>'200',
                'style'=>'text-align:center',
             ), 
		),
		'from_department_name',
		'to_department_name',
		array(
			'name' => 'status',
			'value'=> 'Transfer::getStatusName($data->status)',
		),		
		array(            // display 'create_time' using an expression
            'name'=>'effective_time',
            'value'=>'date("Y-m-d", $data->effective_time)',
        ),
		'start_c_username',
		
		array(            // display a column with "view", "update" and "delete" buttons
            'class'=>'CButtonColumn',
			'template'=>'{audit}',
			'buttons'=>array(
                    'audit' => array(
                            'label'=>'查看',     // text label of the button
                            'url'=>'Yii::app()->controller->createUrl("transfer/detail",array("id"=>$data->primaryKey))',       // a PHP expression for generating the URL of the button
                            'imageUrl'=>Yii::app()->request->baseUrl.'/global/img/icons/magnifier.png',  // image URL of the button. If not set or false, a text link is used
                            'options'=>array('style'=>'cursor:pointer;'), // HTML options for the button tag
                            'visible'=>'true',
                    ),
            ),
			
        ),
		
		
		
	),
	'htmlOptions'=>array(
		'style'=>'text-align:center',
	), 
		
));
?>
